package com.yiyoucheng.mapper;

import com.github.pagehelper.Page;
import com.yiyoucheng.entity.QueryCondition;
import com.yiyoucheng.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmployeeMapper {
    //查询所有员工
    public List<Employee> findAll();

    //员工信息条件+分页查询
    public Page<Map> selectByCondition(@Param("queryCondition") QueryCondition queryCondition);

    //根据id查询员工信息
    public Employee findById(@Param("id") Integer id);

    //新增员工信息
    public void add(Employee employee);

    //更改员工信息
    public void update(Employee employee);

    //根据id删除员工信息(软删除)
    public void deleteById(Integer id);

    //根据员工编号查询员工信息
    public Employee findByCode(@Param("code") String code);

    //查询所有员工的地址信息
    public List<String> findAddressList();

    //查询所有员工的姓名信息
    // public List<Map> findNameList();
    public List<String> findNameList();
}
